def my_zigzag(a):
    if a == 0:
        return 0
    elif a > 0:
        return a * 2
    else:
        return a * (-2) - 1


print(my_zigzag(10))
